<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>文章修改</title>


    <link rel="shortcut icon" href="__PUB__/favicon.ico">
    <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
      <div class="ibox-title">
	       <h5>文章修改</h5>
        </div>
          <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
 
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" action ="{:U('Article/edt')}" enctype = "multipart/form-data">
                        <input type="hidden" name="id" value="{$Article.id}" />
                            <div class="form-group">
                                <label class="col-sm-2 control-label">文章标题</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name ="title" placeholder="控制在25个字、50个字节以内" value="{$Article.title}">
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">导读标签</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name ="tags" value ="{$Article.tags}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">作者</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name ="author" value ="{$Article.author}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">文章配图</label>
                                
								<input id="lefile" type="file" style="display:none;"name ="url"> 
                                <div class="col-sm-10">
                                   <div class="input-append">  
									    <input id="photoCover" type="text" class="form-control" style="width:300px;display:inline-block;">  
									    <a class="btn btn-sm btn-primary" onclick="$('#lefile').click();">上传图片</a>  
									</div>
                                     <if condition="$Article[url] eq ''">
	                                     <td>暂无</td>
	                                 <else/>
	                                     <td><img  src="{$vo.url|substr=1}" height="50" /></td> 
	                                 </if>
                                </div>
                            </div>
                          	<div class="form-group">
                                <label class="col-sm-2 control-label">状态</label>

                                <div class="col-sm-10">
                                    <div class="radio">
                                        <label>
                                            <input type="radio" style="margin-top: 2px;"<if condition="$Article[status] eq 1"> checked="checked" </if> value="1" id="optionsRadios1" name="status">显示
                                        </label>
                                        <label>
                                            <input type="radio" style="margin-top: 2px;"<if condition="$Article[status] eq 0"> checked="checked" </if>value="0" id="optionsRadios2" name="status">不显示
                                        </label>
                                    </div>
                                </div>
                            </div> 
                            <div class="form-group">
                                <label class="col-sm-2 control-label">分类</label>
                                
                                <div class="col-sm-10">
                                    <select name="classify" class="form-control"style="width:300px;">
								        <foreach name="cat_list" item="vo">
											<option value="{$vo.cid}" <if condition="$vo[cid] eq $Article[classify]"> selected = "selected" </if>>{$vo.name}</option>
										</foreach>
					    		   </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">文章内容</label>

                                <div class="col-sm-10">
                                    <textarea name="content" id="content">{$Article.content}</textarea>
                                </div>
                            </div>
                            <input type="submit" value="确定修改" class ="btn btn-sm btn-primary"style ="margin: 0 0 0 700px;"/>
                       </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

</body>
    <script src="__PUB__/ueditor/ueditor.config.js" ></script>
	<script src="__PUB__/ueditor/ueditor.all.min.js" > </script>
	<script src="__PUB__/ueditor/lang/zh-cn/zh-cn.js" ></script>
	<script src="__JS__/jquery.min.js?v=2.1.4"></script>
    <script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
    <script>
       
        UE.getEditor('content',{initialFrameWidth:1300,initialFrameHeight:400,});

        $('#lefile').change(function() {  
        	$('#photoCover').val($(this).val());  
        });  
 
    </script>
</html>
